// ============================================================================
// Name : ScannerException.java
// Author : iron.yin@gmail.com
// Version : v1.0
// Copyright : RisingSun CO,.LTD
// Description : ScannerException.java in Java
// ============================================================================
package cc.risingsun.wing.core.scanner;

/**
 * 扫描器异常类,继承了RuntimeException
 * 
 * @author iron.yin@gmail.com
 */
public class ScannerException extends RuntimeException {
	private static final long serialVersionUID = 4082947063195127719L;
	private static final String EXCEPTION_TMP="scanner %s has occur error";

	private String resource;
	
	public ScannerException(String resource) {
		this(resource,String.format(EXCEPTION_TMP, resource));
	}

	public ScannerException(String resource,String message) {
		super(message);
		this.resource = resource;
	}

	public ScannerException(String message, Throwable cause) {
		super(message, cause);
	}

	public ScannerException(Throwable cause) {
		super(cause);
	}
	
	public String getResource(){
		return resource;
	}
}
